<!--<section class="content-header" style="margin-top: 50px">
	<sn-breadcrumb datalist="crumbBaseData"></sn-breadcrumb>
	<h4>
		<div></div><strong>安全扫描:{{task.taskName}}{{titleDesc}}</strong></h4>
	<div style="height: 5px"></div>

</section>-->
<section class="content-header" style="padding-top:0;padding-left:0;padding-right:0;">   
	<p style="padding-top:15px;padding-left:15px;"><a style="color:#555;" href="#/">首页</a> > <a style="color:#555;" href="/#/overview/appManage/">应用管理</a>
	 > <a style="color: #555" href="/#/securityScanTask">安全扫描</a>> <a style="color: #11b983">{{titleDesc}}</a></p>
		<h4><div class="square"></div><strong style="position: relative;top: -8px;font-weight: normal;font-size: 18px;color: #000;">安全扫描:{{task.taskName}}{{titleDesc}}</strong></h4>
	<div style="height: 5px;background: #dee3ec;"></div>
</section>
<section class="content">
            
    <form class="form-horizontal" name="myForm" ng-show="action=='create'">

        <div>
			<div class="fontStyle">任务名称</div>
			<div class="linestyle"></div>
			 <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="red">*</span>任务名称:</label>
                        <div class="col-sm-5">
                            <input type="text" placeholder="{{defaultTaskName}}" name="taskName" ng-model="taskName" required  maxlength="30" ng-maxlength="30"   ng-blur="taskCheck()" size="50">
                        </div>
                        <!-- 输入框校验 -->
	                    <div class="col-sm-3">
	                    <span ng-show="myForm.taskName.$dirty && myForm.taskName.$invalid">
				            <span class="form-control-static error"
				               ng-show="myForm.taskName.$error.maxlength">
				                <i class="fu fu-cross-circle" aria-hidden="true">最多30位</i>
				            </span>
				            <span class="form-control-static error"
				               ng-show="myForm.taskName.$error.required ">
				                <i class="fu fu-cross-circle" aria-hidden="true">不能为空</i>
				            </span>
				          
				         </span>
				         <span class="form-control-static error" 
				            	ng-show="taskNameExist">
				                <i class="fu fu-cross-circle small-i" aria-hidden="true"></i>该任务名称已存在
				         </span>
				         <span class="form-control-static success"
				               ng-show="!taskNameExist && myForm.taskName.$valid && myForm.taskName.$dirty">
				                <i class="fu fu-check-circle" aria-hidden="true"></i>
				         </span>
			        	</div>
                        
                    </div>
		
		</div>            
        <div>
			<div class="fontStyle">扫描地址</div>
			<div class="linestyle"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="red">*</span>扫描url:</label>
				<div class="col-sm-5">
					<input name="url" ng-model="url" size="50" required  ng-pattern="/^http[s]{0,1}://[a-zA-Z_\/0-9#.]+$/"/>
				</div>
				<!-- 输入框校验 -->
				<div class="col-sm-2">
					<span ng-show="myForm.url.$dirty && myForm.url.$invalid">
							
						<span class="form-control-static error"
						ng-show="myForm.url.$error.required ">
							<i class="fu fu-cross-circle" aria-hidden="true">不能为空</i>
						</span>
						<span class="form-control-static error" 
			             	ng-show="myForm.url.$error.pattern">
			                <i class="fu fu-cross-circle small-i" aria-hidden="true"></i>必须以http://或https://开头,并检查路径合法性
			            </span>
					</span>
					<span class="form-control-static success" ng-show="myForm.url.$valid && myForm.url.$dirty" >
									<i class="fu fu-check-circle" aria-hidden="true"></i>
								</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label" style="padding-top: 2px;"><span class="red">*</span>延时:</label>
				<div class="col-sm-5">
					<div class="ux-radio-inline">
										<label>
											<input type="radio" ng-value="0" name="delay"  ng-model="delay"  required="true">
											<span class="ux-radio-inner">立即执行</span>
										</label>
					</div>
					<div class="ux-radio-inline">
										<label>
											<input type="radio" ng-value="10" name="delay" ng-model="delay"  required="true">
											<span class="ux-radio-inner">10分钟</span>
										</label>
					</div>
					<div class="ux-radio-inline">
										<label>
											<input type="radio" ng-value="30" name="delay" ng-model="delay"  required="true">
											<span class="ux-radio-inner">30分钟</span>
										</label>
					</div>
					<div class="ux-radio-inline">
										<label>
											<input type="radio" ng-value="60" name="delay" ng-model="delay"  required="true">
											<span class="ux-radio-inner">60分钟</span>
										</label>
					</div>
				</div>
		
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label" style="padding-top: 2px;"><span class="red">*</span>检查项:</label>
				<div class="col-sm-3">
			 	<div class="ux-radio-inline">
									<label>
										<input type="radio" name="checkType" ng-value="1" ng-model="checkType"  required="true">
										<span class="ux-radio-inner">所有</span>
									</label>
				</div>
				<div class="ux-radio-inline">
									<label>
										<input type="radio" name="checkType" ng-value="0" ng-model="checkType"  required="true">
										<span class="ux-radio-inner">默认</span>
									</label>
				</div>					
					<!--<input type="radio" ng-value="1" ng-model="checkType" name="checkType" />所有
					<input type="radio" ng-value="0" ng-model="checkType" name="checkType" />默认-->
				</div>
			  <div class="fu fu-question-circle" ng-click="showTaskData()"></div>
			</div>
		</div>
		 <div>
        	<div class="fontStyle">账号</div>
			<div class="linestyle"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label">用户名:</label>
				<div class="col-sm-5">
					<input type="text" ng-model="login.userName" size="50"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">密码:</label>
				<div class="col-sm-5">
					<input type="password" ng-model="login.password" size="50"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 " >
				</div>
				<div class="col-sm-10 red" >
						*若扫描地址需要登录，请输入用户名和密码
				</div>
			</div>
		</div>
        <div>
			<div class="fontStyle">邮件通知</div>
			<div class="linestyle"></div>
             <div class="form-group">
                        <label  class="col-sm-2 control-label"><span class="red">*</span>通知人员:</label>
                         <div class="col-sm-5">
							 <cd-sel-multi sel-data="users" sel-selected="notifierRepeat" sel-eight="getandupdate(num)"></cd-sel-multi>
                           <!--<select  select2='notifierselect2option' style="width:300px" name="notifierList" select-model="notifierList" multiple >
                           <option value="{{d.id}}" ng-repeat="d in notifierRepeat" ng-if="notifierRepeat" selected="selected" >{{d.name}}</option>
                			</select>-->
                        </div>
                        
            </div>
             <div class="form-group">
                        <label  class="col-sm-2 control-label">描述:</label>
                        <div class="col-sm-5">
                        	<textarea rows="3" cols="30" name="description" ng-model="description"  maxlength="255;"  ></textarea><span>{{description.length || 0}}/255</span>
                        </div>
                        
                          <!-- 输入框校验 -->
	                    <div class="col-sm-3">
	                      <span ng-show="myForm.description.$dirty && myForm.description.$invalid">
				            <span class="form-control-static error"
				               ng-show="(myForm.description.$error.maxlength) && myForm.description.$touched && !myForm.description.$error.required">
				                <i class="fu fu-cross-circle" aria-hidden="true">最多255位字符</i>
				            </span>
				         
				            </span>
				            <span class="form-control-static success"
				               ng-show="myForm.description.$valid && myForm.description.$dirty">
				                <i class="fu fu-check-circle" aria-hidden="true"></i>
				            </span>
			        	</div>
            </div>
		
		</div>          
                  
                    
              
                  
                  
                    
                    
                    
                  
                </form>
            
            
              <form class="form-horizontal" name="myForm1" ng-show="action=='edit' ">
              <div>
				<div class="fontStyle">任务名称</div>
				<div class="linestyle"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="red">*</span>任务名称:</label>
                        <div class="col-sm-5">
                           {{task.taskName}}
                        </div>
                    </div>
             </div>
              <div>
				<div class="fontStyle">扫描地址</div>
				<div class="linestyle"></div>
                    <div class="form-group">
                       <label class="col-sm-2 control-label"><span class="red">*</span>扫描url:</label>
						<div class="col-sm-5">
							<input name="url" ng-model="task.url" size="50" required  ng-pattern="/^http[s]{0,1}://[a-zA-Z_\/0-9#.]+$/"/>
						</div>
						<!-- 输入框校验 -->
						<div class="col-sm-2">
							<span ng-show="myForm1.url.$dirty && myForm1.url.$invalid">
									
								<span class="form-control-static error"
								ng-show="myForm1.url.$error.required ">
									<i class="fu fu-cross-circle" aria-hidden="true">不能为空</i>
								</span>
								<span class="form-control-static error" 
									ng-show="myForm1.url.$error.pattern">
									<i class="fu fu-cross-circle small-i" aria-hidden="true"></i>必须以http://或者https://开头,并检查路径合法性
								</span>
							</span>
							<span class="form-control-static success" ng-show="myForm1.url.$valid && myForm1.url.$dirty" >
											<i class="fu fu-check-circle" aria-hidden="true"></i>
							</span>
						</div>
                        
                    </div>
                 
                    
                      <div class="form-group">
                        <label  class="col-sm-2 control-label" style="padding-top: 2px;"><span class="red">*</span>延时:</label>
							<div class="col-sm-5">
								<div class="ux-radio-inline">
													<label>
														<input type="radio" ng-value="0" name="delay" ng-model="task.delay"  required="true">
														<span class="ux-radio-inner">立即执行</span>
													</label>
								</div>
								<div class="ux-radio-inline">
													<label>
														<input type="radio" ng-value="10" name="delay" ng-model="task.delay"  required="true">
														<span class="ux-radio-inner">10分钟</span>
													</label>
								</div>
								<div class="ux-radio-inline">
													<label>
														<input type="radio" ng-value="30" name="delay" ng-model="task.delay"  required="true">
														<span class="ux-radio-inner">30分钟</span>
													</label>
								</div>
								<div class="ux-radio-inline">
													<label>
														<input type="radio" ng-value="60" name="delay" ng-model="task.delay"  required="true">
														<span class="ux-radio-inner">60分钟</span>
													</label>
								</div>
							</div>
                    </div>
                 
                 
                     <div class="form-group">
                        <label  class="col-sm-2 control-label" style="padding-top: 2px;"><span class="red">*</span>检查项:</label>
                        <div class="col-sm-3">
							 <div class="ux-radio-inline">
									<label>
										<input type="radio" name="checkType" ng-value="1" ng-model="task.checkType"  required="true">
										<span class="ux-radio-inner">所有</span>
									</label>
							</div>
							<div class="ux-radio-inline">
									<label>
										<input type="radio" name="checkType"  ng-value="0" ng-model="task.checkType"  required="true">
										<span class="ux-radio-inner">默认</span>
									</label>
							</div>
                         	<!--<input type="radio" ng-value="1" ng-model="task.checkType" name="checkType" />所有
                         	<input type="radio" ng-value="0" ng-model="task.checkType" name="checkType"/>默认-->
                        </div>
                         <div class="fu fu-question-circle" ng-click="showTaskData()"></div>
				          
                    </div>
                 </div>
                    
			<div>
	        	<div class="fontStyle">账号</div>
				<div class="linestyle"></div>
                <div class="form-group">
                        <label  class="col-sm-2 control-label">用户名:</label>
                        <div class="col-sm-5">
                         <input type="text" ng-model="login.userName"/>
                        </div>
                </div>
                    
                     
                <div class="form-group">
                        <label  class="col-sm-2 control-label">密码:</label>
                        <div class="col-sm-5">
                         <input type="password" ng-model="login.password" />
                        </div>
                </div>

                </div>
                 <div>
					<div class="fontStyle">邮件通知</div>
					<div class="linestyle"></div>
                 <div ng-if="show">
                   <div class="form-group">
                        <label  class="col-sm-2 control-label"><span class="red">*</span>通知人员:</label>
                         <div class="col-sm-5">
							<cd-sel-multi sel-data="users" sel-selected="notifierRepeat" sel-eight="getandupdate(num)"></cd-sel-multi>
						<!--<select select2='notifierselect2option' style="width:300px" name="notifierList" select-model="notifierList" multiple required>
	                         <option value="{{d.id}}" ng-repeat="d in notifierRepeat"  ng-if="notifierRepeat"   selected="selected">{{d.name}}</option>
	                    </select>-->
                        </div>
                        
                         
                    </div>
                
                    </div>
                    </div>
                    
                     <div>
					<div class="fontStyle">描述</div>
					<div class="linestyle"></div>
					<div class="form-group">
                        <label  class="col-sm-2 control-label">描述:</label>
                        <div class="col-sm-5">
                        	<textarea rows="3" cols="30" name="description" ng-model="task.description"  maxlength="255;" ></textarea><span>{{task.description.length || 0}}/255</span>
                        </div>
                        
                          <!-- 输入框校验 -->
	                    <div class="col-sm-3" >
	                      <span ng-show="myForm1.description.$dirty && myForm1.description.$invalid">
				            <span class="form-control-static error"
				               ng-show="(myForm1.description.$error.maxlength) && myForm1.description.$touched && !myForm1.description.$error.required">
				                <i class="fu fu-cross-circle" aria-hidden="true">最多255位字符</i>
				            </span>
				         
				          
				            
				            </span>
				            <span class="form-control-static success"
				               ng-show="myForm1.description.$valid && myForm1.description.$dirty">
				                <i class="fu fu-check-circle" aria-hidden="true"></i>
				            </span>
			        	</div>
			        	</div>
						</div>
                </form>
          
          
          
             <form class="form-horizontal"  ng-show="action=='detail' ">
             
               <div>
					<div class="fontStyle">任务名称</div>
					<div class="linestyle"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">任务名称:</label>
                        <div class="col-sm-5">
                           {{task.taskName}}
                        </div>
                    </div>
                  </div>
                  
                <div>
					<div class="fontStyle">扫描地址</div>
					<div class="linestyle"></div>
                    <div class="form-group">
                        <label  class="col-sm-2 control-label">扫描url:</label>
                        <div class="col-sm-5">
	                        {{task.url}}
                        </div>
                    </div>
                  
                      <div class="form-group">
                        <label  class="col-sm-2 control-label">延时:</label>
                        <div class="col-sm-5">
                        	  {{task.delay | delayFilter}}
                        </div>
                    </div>
                    
                     <div class="form-group">
                        <label  class="col-sm-2 control-label">检查项:</label>
                        <div class="col-sm-5">
                         	  {{task.checkType | checkTypeFilter}}
                        </div>
                    </div>
                     </div>
                    <div>
		        	<div class="fontStyle">账号</div>
					<div class="linestyle"></div>
                     <div class="form-group">
                        <label  class="col-sm-2 control-label">用户名:</label>
                        <div class="col-sm-5">
                        {{login.userName}}
                        </div>
                    </div>
                    
                     
                     <div class="form-group">
                        <label  class="col-sm-2 control-label">密码:</label>
                        <div class="col-sm-5">
                         ******
                        </div>
                    </div>
                    </div>
                   <div>
					<div class="fontStyle">邮件通知</div>
					<div class="linestyle"></div>
                     <div ng-if="show">
                     <div class="form-group">
                        <label  class="col-sm-2 control-label">通知人员:</label>
                        <div class="col-sm-5">
                             <div ng-repeat="d in notifierRepeat"  class="divfullname">{{d.name}}</div> 
                        </div>
                    </div>
                    </div>
                    </div>
                    <div>
					<div class="fontStyle">描述</div>
					<div class="linestyle"></div>
                     <div class="form-group">
                        <label  class="col-sm-2 control-label">描述:</label>
                        <div class="col-sm-5">
                         <div class="col-sm-5">{{task.description}}</div>
                        </div>
                      </div>    
                      </div>
                </form>
                

				        <div class="form-group">
                        <label  class="col-sm-2 control-label"></label>
                        <div class="col-sm-5">
                        <button ng-if="action=='create'" class="btn btn-primary" ng-click="commit()" ng-disabled="myForm.$invalid || !commited" > {{commitDesc}}</button>
						<button ng-if="action=='edit'" class="btn btn-primary" ng-click="commit()" ng-disabled="myForm1.$invalid || !commited" > {{commitDesc}}</button>
						<button class="btn btn-primary reverse" ng-click="close()"> 关闭</button>
                        </div>
                    </div>

 
</section>